package my.edu.model.User.entity.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Null;
import jakarta.validation.groups.Default;
import lombok.Data;
import my.edu.common.validate.groups.Insert;

import java.util.List;

@Data
public class RoleDTO {
    @Null(message = "新增时id不可传递",groups = {Insert.class})
    private Long id;
    @NotBlank(message = "描述不能为空",groups = { Insert.class,Default.class})
    private String description;
    @NotBlank(message = "名字不能为空",groups = { Insert.class,Default.class})
    private String name;
    @NotEmpty(message = "权限信息不能为空",groups = {Insert.class, Default.class})
    private List<PermissionDTO> permissionList;
}
